﻿@{
    ViewBag.Title = "发货单列表";
    Layout = "~/Views/Shared/_LayoutList.cshtml"; 
}
@(       
 Html.DWZGridFor<Resto.CostControl.Core.DishOrderItem>()
    .ID("gridList")
    .Title("采购单列表")
    .Action(@Url.Action("Index"))
    .Columns(col =>
    {
        col.Bind(e => e.Id).IsKey();
        col.Bind(e => e.SiteId).EnumKey("Region").Width(100).Align(FlexiGridAlign.Left);
        col.Bind(e => e.Date).Width(70).DateFormat("yyyy-MM-dd");
        col.Bind(e => e.Id, "操作", 60).Sortable(false)
        .Template(Url.GridLink("Edit", "生成", "CreateSubItem('${SiteId}','${Date}')"));
    })
)
<script type="text/javascript">
    function CreateSubItem(SiteId, Date) { 
        var url = "@Url.Action("Edit")?SiteId=" + SiteId+"&Date=" + Date;
        OpenModelWindow(url,{ width: 605, height: 450, caption: "编辑采购单", onclose:refreshGrid});
    }
</script>